package com.situ.day6.cal;

public class CalFactory {

    public static Cal createCal(int calType) {
        Cal cal = null;
        switch (calType) {
            case 1: // +
                cal = new Add();
                break;
            case 2:// -
                cal = new Sub();
                break;
        }

        return cal;
    }
}
